<template>
	<view class="info-container">
		<view class="info-title">
			{{info.title}}
		</view>
		<view class="info-time">
			发表时间: {{info.time}}
		</view>
		<view class="info-content">
			{{info.content}}
		</view>
		<view class="info-data">
			<text>阅读{{info.read}}</text>
			<text>点赞{{info.up}}</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				info: {
					id: 0,
					title: "默认标题",
					img: "1.jpg",
					content: "默认内容",
					time: "默认时间",
					read: 0,
					up: 0
				}
			};
		},
		onLoad(params) {
			let data = JSON.parse(params.query.data);
			this.info = data;
			uni.setNavigationBarTitle({
				title: data.title
			})
		}
	}
</script>

<style lang="scss">
.info-container{
	padding: 20rpx;
	.info-title{
		font-size: 48rpx;
		font-weight: bold;
	}
	.info-time{
		margin-top: 20rpx;
		font-size: 32rpx;
		color: #818181;
	}
	.info-content{
		margin-top: 40rpx
	}
	.info-data{
		margin-top: 20rpx;
		@include flex;
		justify-content: space-between;
		text{
			color: #818181;
		}
	}
}
</style>
